import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementPlus from 'element-plus'
import 'element-plus/lib/theme-chalk/index.css';
import locale from 'element-plus/lib/locale/lang/zh-cn'
import './assets/alibaba.css'
import { ElMessage } from 'element-plus'
createApp(App).use(ElementPlus, { locale }).use(store).use(router).mount('#app');
router.beforeEach((to, from, next)=>{
  if(to.path=='/certificate'||to.path=='/certificate1'||to.path=='/download'||to.path=='/help'){
    next({
      path: '/', // 未登录则跳转至login页面
    });
    ElMessage({
      showClose: true,
      message: '暂未开放,敬请期待',
      type: 'warning'
    });
}
  next();
});